<?php
$id=$_POST['kode'];
$id2=$_POST['transfer'];

//Pindah data obat yang memiliki relasi
$sql1="update klaim_obat set id_obat = '$id2' where id_obat = '$id'";
$qry1=mysql_query($sql1);
$sql2="delete from tarif_obat where id_obat='$id'";
$qry2=mysql_query($sql2);

//Hapus data obat
$sql3="delete from master_obat where kode_obat='$id'";
$qry3=mysql_query($sql3);

$url_sukses='utama.php?module=mod_mobat';
if($qry){
	echo "<meta http-equiv='refresh' content='0; url=$url_sukses'>";
	exit;
}else{
	echo mysql_error();
}
?>